import { FormSchema } from '@/components/Table'
import dayjs from 'dayjs'

export const searchFormSchema: FormSchema[] = [
  {
    field: 'classifyId',
    label: '所属科室',
    slot: 'classifyId',
    colProps: { span: 6 },
  },
  {
    field: 'budgetYear',
    label: '选择时间',
    component: 'DatePicker',
    colProps: { span: 6 },
    componentProps: {
      picker: 'year',
    },
  },
  {
    field: 'tag',
    label: '标签名',
    component: 'Input',
    colProps: { span: 6 },
  },
]

export const modalSearchFormSchema: FormSchema[] = [
  {
    field: 'tag',
    label: '标签名',
    component: 'Input',
    colProps: { span: 6 },
  },
]
export const modalFormSchema: FormSchema[] = [
  {
    field: 'budgetYear',
    label: '填报维度',
    component: 'DatePicker',
    colProps: { span: 6 },
    rules: [{ required: true }],
    defaultValue: dayjs(),
    componentProps: {
      picker: 'year',
      valueFormat: 'YYYY',
    },
  },
]

export const modalColumns = [
  {
    title: '标签名',
    dataIndex: 'classifyName',
  },
  {
    title: '标签描述',
    dataIndex: 'description',
  },
]
